@echo off

set targetPath={0}
set shortcutPath=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\{1}.lnk

echo Creating shortcut %shortcutPath% pointing to %targetPath%

echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs
echo sLinkFile = "%shortcutPath%" >> CreateShortcut.vbs
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs
echo oLink.TargetPath = "%targetPath%" >> CreateShortcut.vbs
echo oLink.Save >> CreateShortcut.vbs

cscript CreateShortcut.vbs
del CreateShortcut.vbs

echo Done.
